import Mock from 'mockjs'
let isProduction = process.env.NODE_ENV === 'production';


export const auth =  isProduction ? {} : Mock.mock('/api/auth/user/perm/', {
    "status": {
        "code": "0",
        "description": "success"
    },
    "result": {
        "perms": [{
            "codename": "sms.read"
        },{
            "codename": "withholdrecord.read"
        },{
            "codename": "agency_basic.read"
        },{
            "codename": "contract_extend_source_capital.read"
        },{
            "codename": "contract_extend_source_capital.update"
        }, {
            "codename": "agency_withhold.update"
        }, {
            "codename": "ic_rc_first.reaudit"
        }, {
            "codename": "capital_bohai_repayment.import"
        }, {
            "codename": "agency_district.read"
        }, {
            "codename": "subpay_collection.read"
        }, {
            "codename": "agency_suspend_cashing.read"
        }, {
            "codename": "ic_rc_first_allotted.update"
        }, {
            "codename": "broker.add"
        }, {
            "codename": "agency_district.update"
        }, {
            "codename": "installment_contract.read"
        }, {
            "codename": "contract_breaked_opt.read"
        }, {
            "codename": "ic_qualify.read"
        }, {
            "codename": "agency_suspend_audit.read"
        }, {
            "codename": "capital_refund.export"
        }, {
            "codename": "audit_user.read"
        }, {
            "codename": "capital_repayment.read"
        }, {
            "codename": "capital_refund.import"
        }, {
            "codename": "address_alias.read"
        }, {
            "codename": "ic_rc_second.update"
        }, {
            "codename": "contract_cash.read"
        }, {
            "codename": "audit_user_agency.update"
        }, {
            "codename": "agency_sub.read"
        }, {
            "codename": "cs_qc.pack"
        }, {
            "codename": "address_alias.update"
        }, {
            "codename": "capital_yunxin_repayment.read"
        }, {
            "codename": "subrent_prepay_audit.read"
        }, {
            "codename": "subpay_receipt_sum.read"
        }, {
            "codename": "agency_else.update"
        }, {
            "codename": "agency_basic.create"
        }, {
            "codename": "subrent_calculate.read"
        }, {
            "codename": "subpay_collection.create"
        }, {
            "codename": "capital_refund.read"
        }, {
            "codename": "subrent_cashing_sum.read"
        }, {
            "codename": "broker.update"
        }, {
            "codename": "user_bank_card.update"
        }, {
            "codename": "ic_rc_first_allotted.read"
        }, {
            "codename": "contract_breaked.read"
        }, {
            "codename": "agency_suspend_audit.update"
        }, {
            "codename": "cs_qc.read"
        }, {
            "codename": "subpay_custservice.read"
        }, {
            "codename": "subpay_followup.export"
        }, {
            "codename": "capital_withholding.read"
        }, {
            "codename": "contract_breaked_opt.create"
        }, {
            "codename": "agency.read"
        }, {
            "codename": "contract_cash.update"
        }, {
            "codename": "agency_basic.update"
        }, {
            "codename": "subpay_followup.read"
        }, {
            "codename": "refund_opt.create"
        }, {
            "codename": "subrent_cashing.export"
        }, {
            "codename": "subpay_receipt.export"
        }, {
            "codename": "capital_loan.read"
        }, {
            "codename": "subrent_prepay.read"
        }, {
            "codename": "subpay_overdue_fine.update"
        }, {
            "codename": "ic_rc_second_allotted.update"
        }, {
            "codename": "contract_archived.create"
        }, {
            "codename": "bankroll.create"
        }, {
            "codename": "ic_rc_second.reaudit"
        }, {
            "codename": "refund.audit"
        }, {
            "codename": "subpay_collection_allotted.update"
        }, {
            "codename": "contract_agency.read"
        }, {
            "codename": "audit_user.create"
        }, {
            "codename": "agency_else.read"
        }, {
            "codename": "subpay_collection_allotted.read"
        }, {
            "codename": "bankroll.read"
        }, {
            "codename": "subrent_prepay.update"
        }, {
            "codename": "user_bank_card.read"
        }, {
            "codename": "ic_rc_allotted.read"
        }, {
            "codename": "user_phone.update"
        }, {
            "codename": "ic_rc_allotted.assign"
        }, {
            "codename": "contract_snapshot.delete"
        }, {
            "codename": "subrent_cashing.read"
        }, {
            "codename": "capital_bohai_repayment.export"
        }, {
            "codename": "subpay_receipt.read"
        }, {
            "codename": "ic_rc_allotted.update"
        }, {
            "codename": "ic_rc_allotted_admin.read"
        }, {
            "codename": "refund_opt.read"
        }, {
            "codename": "capital_borrow.read"
        }, {
            "codename": "ic_rc_first.update"
        }, {
            "codename": "ic_rc_allotted_admin.update"
        }, {
            "codename": "capital_withholding.export"
        }, {
            "codename": "ic_rc_second.read"
        }, {
            "codename": "agency_suspend_cashing.update"
        }, {
            "codename": "subrent_cashing.update"
        }, {
            "codename": "subpay_followup.create"
        }, {
            "codename": "subpay_receipt.update"
        }, {
            "codename": "ic_rc_second_allotted.read"
        }, {
            "codename": "refund.export"
        }, {
            "codename": "capital_yunxin_repayment.export"
        }, {
            "codename": "contract_breaked_terms.read"
        }, {
            "codename": "subrent_borrow.update"
        }, {
            "codename": "refund_opt.update"
        }, {
            "codename": "ic_rc_stat_ personal.read"
        }, {
            "codename": "refund.read"
        }, {
            "codename": "bankroll.export"
        }, {
            "codename": "agency_withhold.read"
        }, {
            "codename": "ic_qualify.update"
        }, {
            "codename": "capital_baidu_repayment.read"
        }, {
            "codename": "contract_withhold.read"
        }, {
            "codename": "capital_repayment.export"
        }, {
            "codename": "contract_breaked_opt.update"
        }, {
            "codename": "subrent_borrow.read"
        }, {
            "codename": "agency_sub.create"
        }, {
            "codename": "capital_bohai_repayment.read"
        }, {
            "codename": "ic_sf_second.update"
        }, {
            "codename": "refund.update"
        }, {
            "codename": "contract_snapshot.read"
        }, {
            "codename": "ic_rc_stat.read"
        }, {
            "codename": "contract_breaked.update"
        }, {
            "codename": "user_verification_code.read"
        }, {
            "codename": "subpay_custservice.create"
        }, {
            "codename": "ic_sf_first.read"
        }, {
            "codename": "ic_rc_sum.read"
        }, {
            "codename": "contract_remark.create"
        }, {
            "codename": "audit_user_agency.read"
        }, {
            "codename": "subpay_followup.update"
        }, {
            "codename": "capital_yunxin_repayment.import"
        }, {
            "codename": "bankroll.update"
        }, {
            "codename": "ic_sf_second.read"
        }, {
            "codename": "capital_borrow.export"
        }, {
            "codename": "contract_withhold.update"
        }, {
            "codename": "audit_user.update"
        }, {
            "codename": "refund_opt.export"
        }, {
            "codename": "subpay_receipt.create"
        }, {
            "codename": "ic_sf_first.update"
        }, {
            "codename": "address_alias.create"
        }, {
            "codename": "subpay_collection.update"
        }, {
            "codename": "contract_agency.update"
        }, {
            "codename": "cs_deleted.read"
        }, {
            "codename": "ic_rc_first.read"
        }, {
            "codename": "user_phone.read"
        }, {
            "codename": "cs_qc.update"
        }, {
            "codename": "subrent_prepay_audit.update"
        }]
    }
})

// export const otherName = isProduction ? {} : Mock.mock(/\/v2\/api\/audit\/aliases\//g, {
//     "status": {
//         "code": "0",
//         "description": "success"
//     },
//     "results": [
//         {
//             "f_name":["陈克牛","陈可鸡","陈可开飞机"],
//             "f_remarks":["陈克是大牛","陈可是小鸡","陈可经常开飞机"],
//             "f_state": 0,
//             "f_upstream_id": 1
//         }
//     ]
// })
